/*
 * Copyright (C) 2008 Yohan Liyanage. 
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at 
 * http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 * See the License for the specific language governing permissions and 
 * limitations under the License.
 */

package org.nebulaframework.grid.service.message;

/**
 * Enumeration which represents possible types of
 * {@code ServiceMessage}s.
 * 
 * @author Yohan Liyanage
 * @version 1.0
 * 
 * @see ServiceMessage
 */
public enum ServiceMessageType {
	
	/**
	 * Start of a new {@code GridJob}.
	 */
	JOB_START,
	
	/**
	 * End of an executing {@code GridJob}.
	 */
	JOB_END,
	
	/**
	 * Cancellation of an executing {@code GridJob}.
	 */
	JOB_CANCEL,
	
	/**
	 * A {@code GridNode} has been banned from participating for a 
	 * {@code GridJob}.
	 */
	NODE_BANNED,
	
	/**
	 * A GridNode has joined the Cluster.
	 */
	NODE_REGISTERED,
	
	/**
	 * A GridNode has left the Grid.
	 */
	NODE_UNREGISTERED,
	
	/**
	 * No heart beat from a GridNode (Disconnected). 
	 */
	HEARTBEAT_FAILED,
	
	/**
	 * Peer Cluster Connected.
	 */
	PEER_CONNECTION,
	
	/**
	 * Peer Cluster is disconnected.
	 */
	PEER_DISCONNECTION,
	
	/**
	 * {@code ClusterManager} is shutting down.
	 */
	CLUSTER_SHUTDOWN,
	
	/**
	 * {@code GridNode} was disconnected from
	 * Cluster.
	 */
	NODE_DISCONNECTED,
	
	/**
	 * Local Job Start Event for GridNodes.
	 */
	LOCAL_JOBSTARTED,
	
	/**
	 * Local Job Finished Event for GridNodes.
	 */
	LOCAL_JOBFINISHED,
	
	/**
	 * Local Task Finished Event for GridNodes.
	 */
	LOCAL_TASKDONE,
	
	/**
	 * Local Task Failed Event for GridNodes.
	 */
	LOCAL_TASKFAILED,
	
	
	/**
	 * Local Task Executed Event for GridNodes.
	 */
	LOCAL_TASKEXEC
	
	
}
